<?php
use yii\helpers\Html;
use app\widgets\PartialActiveForm;
use app\widgets\SwitchInputWidget;

$form = PartialActiveForm::begin(['id' => 'formAddRole']);
?>
<?= Html::hiddenInput('id', $role->id) ?>
<?= $form->field($role, 'name') ?>
<?= $form->field($role, 'description')->textarea() ?>
<?= $form->field($role, 'is_enabled')->widget(SwitchInputWidget::className()) ?>
<?php $form::end() ?>